import request from '@/utils/request'

const api_name = '/admin/acl/role'

export default {
 getRoles() {
    return request({
        url:"/api/v1/admin/role/getAllRolesWithAdmins",
        method: 'get',
      })
    },
 addRole(role){
   return request({
       url:"/api/v1/admin/role/addRole",
       method: 'post',
       data:role
     })
 },
 updateRole(role){
   return request({
       url:"/api/v1/admin/role/updateRole",
       method: 'put',
       data:role
     })
 },
 getRoleById(roleId){
   return request({
       url:"/api/v1/admin/role/getRoleById/"+roleId,
       method: 'get'
     })
 },
 deleteRoleById(roleId){
   return request({
       url:"/api/v1/admin/role/deleteRoleById/"+roleId,
       method: 'delete'
     })
 }

}
